﻿// 主界面

using UnityEngine;
using UnityEngine.UI;
using System;
using System.Collections;
using MotionFramework.UIKit;


namespace DemoProject
{
    public class MainForms : UIWindow
    {

        protected override void OnInit()
        {
            //本窗体状态
            CurrentUIType.UIWindow_Type = UIWindowType.Normal;
            CurrentUIType.UIWindow_ShowMode = UIWindowShowMode.HideOther;

            //事件注册
            AddClickEventListener("Btn_Market",
                () => ShowUIWindow(UIWindowID.MarketForms.ToString())
            );            
            AddClickEventListener("Btn_Exit",   //这个退出游戏，需要调试？？？
                () => CloseUIWindow<MarketForms>()
            );
        }//Awake_end

        //测试
        //IEnumerator Start()
        //{
        //    yield return new WaitForSeconds(2F);
        //    UIManager.GetInstance().Test_DisplayArrayCount();
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //    Log.Write("--  --");
        //}

        #region  窗体生命周期
        #endregion
    }//Class_end
}